package com.it.openfeign.controller;

import com.it.openfeign.feign.DiscoveryNacosFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/feign")
public class FeignController {

    @Resource  //这里推荐resource  @Autowired 为强绑定，不过也可以正常使用。
    DiscoveryNacosFeign discoveryNacosFeign;

    @RequestMapping("/add")
    public String add() throws InterruptedException {
        System.out.println("调用成功!");
        return "Hello Feign";
    }
}
